<?php
/**
 * Map24Routing class file
 * 
 * @author    {author}
 * @copyright {copyright}
 * @package   {package}
 */

/**
 * RequestHeader.CustomerKeyValuePair class
 */
if ( !class_exists('RequestHeaderCustomerKeyValuePair') )
{
require_once 'RequestHeader.CustomerKeyValuePair.php5';
}
/**
 * ResponseHeader class
 */
if ( !class_exists('ResponseHeader') )
{
require_once 'ResponseHeader.php5';
}
/**
 * GeocodedAddress.Quality class
 */
if ( !class_exists('GeocodedAddressQuality') )
{
require_once 'GeocodedAddress.Quality.php5';
}
/**
 * Coordinate class
 */
if ( !class_exists('Coordinate') )
{
require_once 'Coordinate.php5';
}
/**
 * GeocodedAddress.Alternative class
 */
if ( !class_exists('GeocodedAddressAlternative') )
{
require_once 'GeocodedAddress.Alternative.php5';
}
/**
 * GeocodedAddress class
 */
if ( !class_exists('GeocodedAddress') )
{
require_once 'GeocodedAddress.php5';
}
/**
 * RouteViaPoint class
 */
if ( !class_exists('RouteViaPoint') )
{
require_once 'RouteViaPoint.php5';
}
/**
 * RouteSegmentDirectionHint class
 */
if ( !class_exists('RouteSegmentDirectionHint') )
{
require_once 'RouteSegmentDirectionHint.php5';
}
/**
 * RouteSegmentStreetClass class
 */
if ( !class_exists('RouteSegmentStreetClass') )
{
require_once 'RouteSegmentStreetClass.php5';
}
/**
 * RouteSegmentDescription class
 */
if ( !class_exists('RouteSegmentDescription') )
{
require_once 'RouteSegmentDescription.php5';
}
/**
 * CoordinatesArray class
 */
if ( !class_exists('CoordinatesArray') )
{
require_once 'CoordinatesArray.php5';
}
/**
 * RouteSegmentTMCHint class
 */
if ( !class_exists('RouteSegmentTMCHint') )
{
require_once 'RouteSegmentTMCHint.php5';
}
/**
 * Property class
 */
if ( !class_exists('Property') )
{
require_once 'Property.php5';
}
/**
 * MapCoordinatesArray class
 */
if ( !class_exists('MapCoordinatesArray') )
{
require_once 'MapCoordinatesArray.php5';
}
/**
 * RouteSegment class
 */
if ( !class_exists('RouteSegment') )
{
require_once 'RouteSegment.php5';
}
/**
 * Route class
 */
if ( !class_exists('Route') )
{
require_once 'Route.php5';
}
/**
 * CalculateRouteResponse class
 */
if ( !class_exists('CalculateRouteResponse') )
{
require_once 'CalculateRouteResponse.php5';
}
/**
 * RequestHeader class
 */
if ( !class_exists('RequestHeader') )
{
require_once 'RequestHeader.php5';
}
/**
 * RouteCalculationMode class
 */
if ( !class_exists('RouteCalculationMode') )
{
require_once 'RouteCalculationMode.php5';
}
/**
 * RoutingRequestVehicleType class
 */
if ( !class_exists('RoutingRequestVehicleType') )
{
require_once 'RoutingRequestVehicleType.php5';
}
/**
 * RoutingRequestSpeedClassification class
 */
if ( !class_exists('RoutingRequestSpeedClassification') )
{
require_once 'RoutingRequestSpeedClassification.php5';
}
/**
 * Address class
 */
if ( !class_exists('Address') )
{
require_once 'Address.php5';
}
/**
 * CoordinateAndAddress class
 */
if ( !class_exists('CoordinateAndAddress') )
{
require_once 'CoordinateAndAddress.php5';
}
/**
 * CalculateRouteRequest.ViaPointProperty class
 */
if ( !class_exists('CalculateRouteRequestViaPointProperty') )
{
require_once 'CalculateRouteRequest.ViaPointProperty.php5';
}
/**
 * CalculateRouteRequest.ViaPoint class
 */
if ( !class_exists('CalculateRouteRequestViaPoint') )
{
require_once 'CalculateRouteRequest.ViaPoint.php5';
}
/**
 * CalculateRouteRequest class
 */
if ( !class_exists('CalculateRouteRequest') )
{
require_once 'CalculateRouteRequest.php5';
}
/**
 * FetchRouteResponse class
 */
if ( !class_exists('FetchRouteResponse') )
{
require_once 'FetchRouteResponse.php5';
}
/**
 * FetchRouteRequest class
 */
if ( !class_exists('FetchRouteRequest') )
{
require_once 'FetchRouteRequest.php5';
}
/**
 * FetchRouteLinksResponse class
 */
if ( !class_exists('FetchRouteLinksResponse') )
{
require_once 'FetchRouteLinksResponse.php5';
}
/**
 * FetchRouteLinksRequest class
 */
if ( !class_exists('FetchRouteLinksRequest') )
{
require_once 'FetchRouteLinksRequest.php5';
}
/**
 * FetchRouteShapeResponse class
 */
if ( !class_exists('FetchRouteShapeResponse') )
{
require_once 'FetchRouteShapeResponse.php5';
}
/**
 * FetchRouteShapeRequest class
 */
if ( !class_exists('FetchRouteShapeRequest') )
{
require_once 'FetchRouteShapeRequest.php5';
}
/**
 * CalculateRoutesIsolineResponse class
 */
if ( !class_exists('CalculateRoutesIsolineResponse') )
{
require_once 'CalculateRoutesIsolineResponse.php5';
}
/**
 * CalculateRoutesIsolineRequest class
 */
if ( !class_exists('CalculateRoutesIsolineRequest') )
{
require_once 'CalculateRoutesIsolineRequest.php5';
}
/**
 * LinkInfoResponse.SpeedCategory class
 */
if ( !class_exists('LinkInfoResponseSpeedCategory') )
{
require_once 'LinkInfoResponse.SpeedCategory.php5';
}
/**
 * LinkInfoResponse.MatchingPoint class
 */
if ( !class_exists('LinkInfoResponseMatchingPoint') )
{
require_once 'LinkInfoResponse.MatchingPoint.php5';
}
/**
 * LinkInfoResponse class
 */
if ( !class_exists('LinkInfoResponse') )
{
require_once 'LinkInfoResponse.php5';
}
/**
 * LinkInfoRequest class
 */
if ( !class_exists('LinkInfoRequest') )
{
require_once 'LinkInfoRequest.php5';
}

/**
 * Map24Routing class
 * 
 *  
 * 
 * @author    {author}
 * @copyright {copyright}
 * @package   {package}
 */
class Map24Routing {

  private $client;

  private $wsdl = null;

  /**
   *
   * @param MapTP-System the request should be executed on $server
   * @param Map24Id $mid
   * @param Map24SessionId $sid
   */ 
  public function __construct($server=null, $mid=null, $sid=null, $interface='map24/webservices1.5') {
    if($server==null || $mid==null || $sid==null){
      echo "ERROR: Not enough or invalid arguments! Unable to initialise SoapClient.";
    }
    else {
      $this->wsdl = "http://".$server."/".$interface."?wsdl=Map24Routing";
      $this->client = new SoapClient($this->wsdl, array('location' => "http://".$server."/".$interface."?soap=Map24Routing&mid=".$mid."&sid=".$sid, 'trace' => 0, 'exceptions' => 1));
    }
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param CalculateRouteRequest $CalculateRouteRequest
   * @return CalculateRouteResponse
   */
  public function calculateRoute(RequestHeader $RequestHeader, CalculateRouteRequest $CalculateRouteRequest) {
    return $this->client->calculateRoute($RequestHeader, $CalculateRouteRequest);
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param FetchRouteRequest $FetchRouteRequest
   * @return FetchRouteResponse
   */
  public function fetchRoute(RequestHeader $RequestHeader, FetchRouteRequest $FetchRouteRequest) {
    return $this->client->fetchRoute($RequestHeader, $FetchRouteRequest);
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param FetchRouteLinksRequest $FetchRouteLinksRequest
   * @return FetchRouteLinksResponse
   */
  public function fetchRouteLinks(RequestHeader $RequestHeader, FetchRouteLinksRequest $FetchRouteLinksRequest) {
    return $this->client->fetchRouteLinks($RequestHeader, $FetchRouteLinksRequest);
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param FetchRouteShapeRequest $FetchRouteShapeRequest
   * @return FetchRouteShapeResponse
   */
  public function fetchRouteShape(RequestHeader $RequestHeader, FetchRouteShapeRequest $FetchRouteShapeRequest) {
    return $this->client->fetchRouteShape($RequestHeader, $FetchRouteShapeRequest);
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param CalculateRoutesIsolineRequest $CalculateRoutesIsolineRequest
   * @return CalculateRoutesIsolineResponse
   */
  public function calculateRoutesIsoline(RequestHeader $RequestHeader, CalculateRoutesIsolineRequest $CalculateRoutesIsolineRequest) {
    return $this->client->calculateRoutesIsoline($RequestHeader, $CalculateRoutesIsolineRequest);
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param LinkInfoRequest $LinkInfoRequest
   * @return LinkInfoResponse
   */
  public function linkInfo(RequestHeader $RequestHeader, LinkInfoRequest $LinkInfoRequest) {
    return $this->client->linkInfo($RequestHeader, $LinkInfoRequest);
  }

}

?>
